let list=[1,1,2,3,4,5];

console.log(list.findIndex(item=>item===1));